import { Type } from 'class-transformer';
import { IsString, IsOptional } from 'class-validator';

export class ListQueryDto {
  @Type(() => Number)
  @IsOptional()
  page: number;

  @Type(() => Number)
  @IsOptional()
  limit: number;

  @IsOptional()
  id: string; // 支持多值查询只能是string

  @Type(() => Number)
  @IsOptional()
  categoryId: number;

  @IsString()
  @IsOptional()
  name: string;

  @IsString()
  @IsOptional()
  managerName: string;
}
